package com.cerosoft.api.http.iface;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.http.cookie.Cookie;

import com.cerosoft.api.exceptions.ConnectionException;
import com.cerosoft.api.http.models.Asset;
import com.cerosoft.api.http.models.HttpResult;

public interface IProxy {
	String getCookie(String key);

	void setCookie(String key, String value, String domain, String path,
			Date expiryDate);

	void clearCookies();

	List<Cookie> getCookies();

	HttpResult<String> post(String url, Map<String, String> parameters)
			throws ConnectionException;

	HttpResult<String> get(String url, Map<String, String> parameters, boolean needEncode)
			throws ConnectionException;

	HttpResult<Asset> download(String url, Map<String, String> parameters,
			IProgressCallback callback) throws ConnectionException;

	HttpResult<Asset> download(String url, Map<String, String> parameters,
			long startByte, long endByte, IProgressCallback callback)
			throws ConnectionException;

}